import App from '../App.vue'

export default [
  {
    path: '/',
    redirect: '/store',
    component: App,
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/user/Login.vue'),
    meta: {},
  },
  {
    name: 'store',
    path: '/store',
    redirect: '/store/dashboard',
    component: () => import('../views/index.vue'),
    meta: {},
    children: [
      {
        path: 'dashboard',
        name: 'dashboard',
        component: () => import('../views/dashboard/index.vue'),
        meta: {},
      },
      {
        path: 'product/search',
        name: 'productSearch',
        component: () => import('../views/product/search.vue'),
      },
      {
        path: 'product',
        name: 'product',
        component: () => import('../views/product/list.vue'),
      },
      {
        path: 'product/detail/:id',
        name: 'productDetail',
        component: () => import('../views/product/detail.vue'),
      },
      {
        path: 'product/add',
        name: 'productAdd',
        component: () => import('../views/product/add.vue'),
      },
      {
        path: 'product/edit/:id',
        name: 'productEdit',
        component: () => import('../views/product/edit.vue'),
      },
      {
        path: 'product/history',
        name: 'productHistory',
        component: () => import('../views/product/history.vue'),
      },
    ],
  },
]
